.class public Lcom/instagram/android/activity/UrlHandlerActivity;
.super Lcom/instagram/android/activity/h;
.source "UrlHandlerActivity.java"


# static fields
.field private static final s:Ljava/lang/Class;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/lang/Class",
            "<*>;"
        }
    .end annotation
.end field


# direct methods
.method static constructor <clinit>()V
    .locals 1

    .prologue
    .line 21
    const-class v0, Lcom/instagram/android/activity/UrlHandlerActivity;

    sput-object v0, Lcom/instagram/android/activity/UrlHandlerActivity;->s:Ljava/lang/Class;

    return-void
.end method

.method public constructor <init>()V
    .locals 0

    .prologue
    .line 19
    invoke-direct {p0}, Lcom/instagram/android/activity/h;-><init>()V

    return-void
.end method


# virtual methods
.method public h()V
    .locals 2

    .prologue
    .line 24
    new-instance v0, Landroid/content/Intent;

    const-class v1, Lcom/instagram/android/nux/SignedOutFragmentActivity;

    invoke-direct {v0, p0, v1}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 25
    const/high16 v1, 0x400

    invoke-virtual {v0, v1}, Landroid/content/Intent;->setFlags(I)Landroid/content/Intent;

    .line 26
    invoke-virtual {p0, v0}, Lcom/instagram/android/activity/UrlHandlerActivity;->startActivity(Landroid/content/Intent;)V

    .line 27
    invoke-virtual {p0}, Lcom/instagram/android/activity/UrlHandlerActivity;->finish()V

    .line 28
    return-void
.end method

.method protected j()V
    .locals 7

    .prologue
    const/4 v6, 0x0

    .line 32
    invoke-static {}, Lcom/instagram/service/a;->a()Lcom/instagram/service/a;

    move-result-object v0

    invoke-virtual {v0}, Lcom/instagram/service/a;->d()Z

    move-result v0

    .line 34
    if-nez v0, :cond_0

    .line 35
    sget v0, Lcom/facebook/ba;->must_be_logged_in:I

    invoke-static {p0, v0, v6}, Landroid/widget/Toast;->makeText(Landroid/content/Context;II)Landroid/widget/Toast;

    move-result-object v0

    invoke-virtual {v0}, Landroid/widget/Toast;->show()V

    .line 36
    invoke-virtual {p0}, Lcom/instagram/android/activity/UrlHandlerActivity;->h()V

    .line 67
    :goto_0
    return-void

    .line 41
    :cond_0
    new-instance v1, Landroid/os/Bundle;

    invoke-direct {v1}, Landroid/os/Bundle;-><init>()V

    .line 43
    invoke-virtual {p0}, Lcom/instagram/android/activity/UrlHandlerActivity;->getIntent()Landroid/content/Intent;

    move-result-object v0

    invoke-virtual {v0}, Landroid/content/Intent;->getDataString()Ljava/lang/String;

    move-result-object v2

    .line 44
    invoke-static {v2}, Landroid/net/Uri;->parse(Ljava/lang/String;)Landroid/net/Uri;

    move-result-object v3

    .line 46
    invoke-virtual {v3}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v0

    const-string v4, "/_u/"

    invoke-virtual {v0, v4}, Ljava/lang/String;->startsWith(Ljava/lang/String;)Z

    move-result v0

    if-eqz v0, :cond_2

    .line 47
    new-instance v0, Lcom/instagram/android/fragment/gs;

    invoke-direct {v0}, Lcom/instagram/android/fragment/gs;-><init>()V

    .line 48
    invoke-virtual {v3}, Landroid/net/Uri;->getPath()Ljava/lang/String;

    move-result-object v2

    const-string v4, "/"

    invoke-virtual {v2, v4}, Ljava/lang/String;->split(Ljava/lang/String;)[Ljava/lang/String;

    move-result-object v2

    .line 50
    array-length v4, v2

    const/4 v5, 0x3

    if-ge v4, v5, :cond_1

    .line 51
    sget-object v0, Lcom/instagram/android/activity/UrlHandlerActivity;->s:Ljava/lang/Class;

    const-string v1, "Improper user url: %s"

    const/4 v2, 0x1

    new-array v2, v2, [Ljava/lang/Object;

    invoke-virtual {v3}, Landroid/net/Uri;->toString()Ljava/lang/String;

    move-result-object v3

    aput-object v3, v2, v6

    invoke-static {v0, v1, v2}, Lcom/facebook/e/a/a;->c(Ljava/lang/Class;Ljava/lang/String;[Ljava/lang/Object;)V

    .line 52
    invoke-virtual {p0}, Lcom/instagram/android/activity/UrlHandlerActivity;->finish()V

    goto :goto_0

    .line 56
    :cond_1
    const/4 v3, 0x2

    aget-object v2, v2, v3

    .line 57
    const-string v3, "UserDetailFragment.EXTRA_USER_NAME"

    invoke-virtual {v1, v3, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    .line 63
    :goto_1
    invoke-virtual {v0, v1}, Landroid/support/v4/app/Fragment;->g(Landroid/os/Bundle;)V

    .line 64
    invoke-virtual {p0}, Lcom/instagram/android/activity/UrlHandlerActivity;->f()Landroid/support/v4/app/r;

    move-result-object v1

    invoke-virtual {v1}, Landroid/support/v4/app/r;->a()Landroid/support/v4/app/af;

    move-result-object v1

    .line 65
    sget v2, Lcom/facebook/aw;->layout_container_main:I

    invoke-virtual {v1, v2, v0}, Landroid/support/v4/app/af;->b(ILandroid/support/v4/app/Fragment;)Landroid/support/v4/app/af;

    .line 66
    invoke-virtual {v1}, Landroid/support/v4/app/af;->a()I

    goto :goto_0

    .line 59
    :cond_2
    new-instance v0, Lcom/instagram/android/fragment/fy;

    invoke-direct {v0}, Lcom/instagram/android/fragment/fy;-><init>()V

    .line 60
    const-string v3, "com.instagram.android.fragment.ARGUMENTS_KEY_SHORT_URL"

    invoke-virtual {v1, v3, v2}, Landroid/os/Bundle;->putString(Ljava/lang/String;Ljava/lang/String;)V

    goto :goto_1
.end method
